package com.lrs.java.j2se_self.gui;
import java.awt.*;
import java.awt.event.*;

public class TestPaint {
	public static void main(String[] args){
		new PaintFrame().launchFrame();
	}
}
class PaintFrame extends Frame {
	public void launchFrame(){
		setBounds(100,200,600,800);
		setVisible(true);
	}
	public void paint(Graphics g){
		Color c = g.getColor();
		g.setColor(Color.green);
		g.fillRect(100,200,100,100);
		g.setColor(c);
		g.drawLine(100, 100, 100, 150);
		int x[] = {100,200,500};
		int y[] = {200,400,300};
		g.fillPolygon(x,y,3);
	}
}